package com.mypage.utils;

import android.app.Activity;
import android.content.Context;
import android.view.inputmethod.InputMethodManager;

public class HideSoftKeyboard {

    public static void hideSoftKeyboard(Context mContext) {
    InputMethodManager inputMethodManager = (InputMethodManager)     

    mContext.getSystemService(Activity.INPUT_METHOD_SERVICE);
    inputMethodManager.hideSoftInputFromWindow(((Activity) mContext).getCurrentFocus().getWindowToken(), 0);
}
}